package topSort;

/**
 * 
 * @author benny
 *
 */
public class Vertice {

	private String _name;
	private int _pos;

	public int get_pos() {
		return _pos;
	}

	public void set_pos(int _pos) {
		this._pos = _pos;
	}

	private int _inDegree;
	private boolean _visited = false;

	public Vertice(String name) {
		_name = name;
	}

	public Vertice(String name, int pos) {
		_name = name;
		_pos = pos;
	}

	public boolean isVisited() {
		return _visited;
	}

	public void setVisited(boolean visited) {
		_visited = visited;
	}

	public int getInDegree() {
		return _inDegree;
	}

	public void setInDegree(int grad) {
		_inDegree = grad;
	}

	public int getPos() {
		return _pos;
	}

	@Override
	public String toString() {
		return "Vertice [_name=" + _name + ", _pos=" + _pos + ", _inDegree= " + _inDegree + "]";
	}

	public String get_name() {
		return _name;
	}

	public void set_name(String _name) {
		this._name = _name;
	}

	@Override
	public boolean equals(Object obj) {
		Vertice temp = (Vertice) obj;

		if (this.get_name() == temp.get_name()) {
			return true;
		} else
			return false;
	}

}
